.home-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 20px;
}

.app-header {
  margin-bottom: 30px;
  text-align: center;
}

.app-header h1 {
  font-family: 'SimSun', 'STSong', serif;
  font-size: 2.2rem;
  color: var(--primary-color);
  margin: 0;
  position: relative;
  display: inline-block;
}

.app-header h1::after {
  content: '';
  position: absolute;
  left: 10%;
  bottom: -8px;
  width: 80%;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--primary-color), transparent);
}

.main-content {
  display: flex;
  gap: 30px;
}

.left-panel {
  flex: 3;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.right-panel {
  flex: 2;
  position: sticky;
  top: 30px;
  align-self: flex-start;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  z-index: 10;
  min-width: 0;
  width: 100%;
}

.tab-navigation {
  display: flex;
  gap: 10px;
  margin-bottom: 5px;
}

.tab-btn {
  padding: 10px 20px;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 500;
  color: var(--text-color);
  transition: all 0.2s ease;
}

.tab-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.tab-btn.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.tab-content {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  min-height: 400px;
}

.list-view, .graph-view {
  padding: 20px;
  height: 100%;
  min-height: 500px;
}

.fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.loading {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 50vh;
  color: var(--text-secondary);
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.herb-detail-container {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: auto;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  max-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
}

.herb-detail-container:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(-5px);
}

.slide-in-up {
  animation: slideInUp 0.4s ease-out;
}

@keyframes slideInUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* 确保关系图谱是可见的 */
.graph-view {
  z-index: 5;
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 关系图谱点击时的样式调整 */
.active-graph {
  margin-bottom: 20px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .main-content {
    flex-direction: column;
  }
  
  .right-panel {
    position: static;
    max-height: none;
    overflow-y: visible;
  }
  
  .herb-detail-container {
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 768px) {
  .home-container {
    padding: 15px;
  }
  
  .app-header h1 {
    font-size: 1.8rem;
  }
  
  .tab-navigation {
    overflow-x: auto;
    padding-bottom: 5px;
  }
  
  .tab-btn {
    padding: 8px 15px;
    white-space: nowrap;
  }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

header {
  text-align: center;
  margin-bottom: 40px;
}

h1 {
  color: #333;
  font-size: 2.5em;
}

.graph-container {
  margin-bottom: 40px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.herb-details {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.properties {
  margin: 20px 0;
}

.properties p {
  margin: 10px 0;
  font-size: 1.1em;
}

.model-viewer {
  margin-top: 20px;
  border-radius: 4px;
  overflow: hidden;
}

.herb-list-empty {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  color: var(--text-tertiary);
  font-style: italic;
  background-color: var(--bg-color);
  border-radius: var(--border-radius);
  border: 1px dashed var(--border-color);
} 